package game.element.position;

public class MovingElementPositionWithDirection extends MovingElementPosition {

	private int previousX;

	private int previousY;
	public MovingElementPositionWithDirection(int x, int y, int width, int height) {
		super(x, y, width, height);
	}

	public int getPreviousX() {
		return previousX;
	}

	public int getPreviousY() {
		return previousY;
	}

	public void setPreviousX(int previousX) {
		this.previousX = previousX;
	}

	public void setPreviousY(int previousY) {
		this.previousY = previousY;
	}

	@Override
	public void setX(int x) {
		previousX = this.x;
		super.setX(x);
	}

	@Override
	public void setY(int y) {
		previousY = this.y;
		super.setY(y);
	}
}